Crate binator_base

source ·
Expand description

Contains a lot of useful binator parser.

Structs§

Enums§

Functions§

  • Parser that will consume all data from stream.
  • ALPHA = A - Z / a - z
  • ALPHANUM = A - Z / a - z / 0 - 9
  • This will return any item in the stream, that equivalent to .next() from iterator. This can be used in many combinator that the root of all others base combinator. any will take care of end of stream and stream error.
  • BIT = 0 / 1
  • CHAR = 0x01 - 0x7F
  • CR = \r
  • Internet standard newline
  • Newline, with and without “\r”.
  • CTL = 0x00 - 0x1F / 0x7F
  • DIGIT = 0-9
  • DQUOTE = “
  • Return Success if the stream return end of stream.
  • Always return a Failure
  • HEXDIG = DIGIT / A - F / a - f
  • HTAB = \t
  • Return Success if item from stream is partially equal to t.
  • Return Success if item from stream is not partially equal to t.
  • LF = \n
  • Take a list of T and return a Parser that will partially Eq in order Item produced by Stream with T in the list
  • Use of this linear-white-space rule permits lines containing only white space that are no longer legal in mail headers and have caused interoperability problems in other contexts.
  • Return a Parser that will split an octet in two into a tuple of octet. For n = 3, 0b11000011u8 will give (0b00011000u8, 0b00000011u8)
  • Will check if next Item from Stream is not partially equal to one of T in the list.
  • Will read an item from the Stream and convert it to an octet
  • Will check if next Item from Stream is partially equal to one of T in the list.
  • Take a parser and return a Parser that will call parse on it.
  • SP = ’ ’
  • Take a token in parameter and return a Parser that don’t read the Stream and always return Success by Cloning the token.
  • Take a &’static str and return a Parser that will compare it with Stream, this requiere the Stream Span to implement AsRef<[u8]>
  • Take a &’static str and return a Parser that will compare it without the ascii case with Stream, this requiere the Stream Span to implement AsRef<[u8]>
  • Return n number of items from stream in a Span
  • Parser that will read stream and return valid utf8 char If you are expecting utf8 you MUST use this Parser, and not character Parser.
  • VCHAR = ! - ~
  • WSP = SP / HTAB

Trait Aliases§